function login() {
    const username = $('.input_txt').val().trim()
    const password = $('.input_pass').val().trim()
    $.ajax({
        type: "post",
        url: "http://localhost:8080/api/v1/admin/user/login",
        data: { username, password },
        success: function (response) {
            if (response.code === 200) {
                // console.log(response.token);

                window.localStorage.setItem('big_token', response.token)
                window.location.href = './index.html'
            } else {
                // alert('错误')
                // 设置模态框文本内容
                $('.modal-body').text(response.msg);
                // 弹出模态框
                $('#loginModal').modal('show')
            }
        }
    });
}